package com.zyd.blog.personal.service.impl;
import	java.util.HashMap;

import com.zyd.blog.personal.service.ProtocolEditService;
import com.zyd.blog.personal.service.ProtocolService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Map;

/**
 * 协议编辑业务逻辑层
 * @author mfy
 */
@Service
public class ProtocolEditServiceImpl implements ProtocolEditService {

    @Resource
    private ProtocolService protocolService;

    @Override
    public boolean updateProtocol(String type, String content){
        Map<String,Object> condition = new HashMap<>(16);
        condition.put("type",type);
        condition.put("content",content);
        return protocolService.savePaotocol(condition);
    }

    @Override
    public String getProtocol(String type){
        return protocolService.getProtocol(type);
    }
}
